package xyz.xmh.pojo.request.file;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import xyz.xmh.autoconfigure.TokenStatic;

/**
 * 2021/10/29 13:46 星期五<br/>
 * 修改文件名的请求
 * @author xuMingHai
 */
@Data
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UpdateRequest {

    /**
     * 驱动ID
     */
    private String driveId = TokenStatic.DEFAULT_DRIVE_ID;

    /**
     * 文件ID
     */
    private String fileId;

    /**
     * 要修改成的文件名
     */
    private String name;

    private final String checkNameMode = "refuse";

    /**
     * 构建重命名文件请求参数
     * @param fileId 文件ID
     * @param name 要修改成的文件名
     */
    public UpdateRequest(String fileId, String name) {
        this.fileId = fileId;
        this.name = name;
    }
}
